package com.lcke.lemon.controller;

import com.lcke.lemon.aop.SolonLog;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Get;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Param;
import org.noear.solon.core.handle.MethodType;

/**
 * @author lenovo
 */
@SolonLog
@Controller
public class SolonController {


    @Mapping("/")
    public String index() {
        return "index";
    }

    @Mapping(value = "/hello",method = MethodType.GET)
    public String hello(@Param(defaultValue = "world") String name) {
        return String.format("Hello %s!", name);
    }
}
